package per.turtle.common.log.service;

import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import per.turtle.system.entity.SysOperLog;
import per.turtle.system.feign.RemoteLogService;

/**
 * 异步调用日志服务
 *
 * @author turtle
 */
@RequiredArgsConstructor
@Service
public class AsyncLogService {

    private final RemoteLogService remoteLogService;

    /**
     * 保存系统日志记录
     */
    @Async
    public void saveSysLog(SysOperLog sysOperLog) {
        remoteLogService.saveLog(sysOperLog);
    }

}
